<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libnetconf: src/session.h Source File</title>

<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="../../cesnet-logo-125.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnetconf
   &#160;<span id="projectnumber">0.1.1</span>
   </div>
   <div id="projectbrief">NETCONF library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0-20120409 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('da/d46/session_8h.html','../../');
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">session.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../da/d46/session_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00040"></a>00040 <span class="preprocessor">#ifndef SESSION_H_</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define SESSION_H_</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &quot;<a class="code" href="../../d8/dd3/ssh_8h.html" title="Functions to connect to NETCONF server via SSH2.">ssh.h</a>&quot;</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include &quot;<a class="code" href="../../d3/d7a/netconf_8h.html" title="libnetconf&#39;s general public functions and structures definitions.">netconf.h</a>&quot;</span>
<a name="l00045"></a>00045 
<a name="l00064"></a>00064 <span class="keyword">struct </span>nc_session* <a class="code" href="../../db/d52/group__session.html#gad821a04ee9dc04bbed04ea1d138afbed" title="Create disconnected session structure.">nc_session_dummy</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* sid, <span class="keyword">const</span> <span class="keywordtype">char</span>* username, <span class="keyword">struct</span> nc_cpblts *capabilities);
<a name="l00065"></a>00065 
<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="../../db/d52/group__session.html#ga20b9940ed7af543a05b4bef6e871cedd" title="Close NETCONF connection with the server.">nc_session_close</a> (<span class="keyword">struct</span> nc_session* session, <span class="keyword">const</span> <span class="keywordtype">char</span>* msg);
<a name="l00077"></a>00077 
<a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="../../db/d52/group__session.html#gaa5994f45a7031dc931bdf4a3acebedee" title="Cleanup the session structure and free all allocated resources.">nc_session_free</a> (<span class="keyword">struct</span> nc_session* session);
<a name="l00087"></a>00087 
<a name="l00094"></a>00094 <a class="code" href="../../db/d52/group__session.html#ga9fba5da8e4c50d2427d0d24e8e7b630c" title="Enumeration of possible states of the NETCONF session.">NC_SESSION_STATUS</a> <a class="code" href="../../db/d52/group__session.html#gacebd018e30c3eeb0638bbb428a1741b4" title="Get information about the session current status.">nc_session_get_status</a> (<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session);
<a name="l00095"></a>00095 
<a name="l00102"></a>00102 <span class="keywordtype">int</span> <a class="code" href="../../db/d52/group__session.html#gac8ea61702127df024c037869feb72d97" title="Get NETCONF protocol version used in the given session.">nc_session_get_version</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session);
<a name="l00103"></a>00103 
<a name="l00115"></a>00115 <span class="keywordtype">int</span> <a class="code" href="../../db/d52/group__session.html#ga826890ed745633bc2d31a53971dada32" title="Get input file descriptor to asynchronous control of input events.">nc_session_get_eventfd</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session);
<a name="l00116"></a>00116 
<a name="l00123"></a>00123 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../db/d52/group__session.html#ga91012cb5ae50651916ee2239661d7603" title="Get NETCONF session ID.">nc_session_get_id</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session);
<a name="l00124"></a>00124 
<a name="l00131"></a>00131 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../db/d52/group__session.html#ga6399681dfce6e139cc5707af25d20bb3" title="Get NETCONF session host.">nc_session_get_host</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session);
<a name="l00132"></a>00132 
<a name="l00139"></a>00139 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../db/d52/group__session.html#ga09bec340611b4b99c8c1bfb2ef3992d6" title="Get NETCONF session port number.">nc_session_get_port</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session);
<a name="l00140"></a>00140 
<a name="l00147"></a>00147 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../db/d52/group__session.html#gabdd090cbc50a8f7db58e5be8062296d6" title="Get NETCONF session username.">nc_session_get_user</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session);
<a name="l00148"></a>00148 
<a name="l00160"></a>00160 <span class="keyword">struct </span>nc_cpblts* <a class="code" href="../../db/d52/group__session.html#ga09bdf1d9eacf9f53bf3f05557ffe0821" title="Get NULL terminated list of capabilities associated with the session.">nc_session_get_cpblts</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session);
<a name="l00161"></a>00161 
<a name="l00169"></a>00169 <span class="keyword">struct </span>nc_cpblts *<a class="code" href="../../db/d52/group__session.html#gae8220136acd191591ad25d6849f0b59c" title="Create new NETCONF capabilities structure.">nc_cpblts_new</a>(<span class="keywordtype">char</span>* <span class="keyword">const</span>* list);
<a name="l00170"></a>00170 
<a name="l00176"></a>00176 <span class="keywordtype">void</span> <a class="code" href="../../db/d52/group__session.html#ga6465c58b3ca057b46655d5ffa90caff3" title="Free NETCONF capabilities structure.">nc_cpblts_free</a>(<span class="keyword">struct</span> nc_cpblts *c);
<a name="l00177"></a>00177 
<a name="l00185"></a>00185 <span class="keywordtype">int</span> <a class="code" href="../../db/d52/group__session.html#ga2ea9b318015206d886c7e54386fc85e3" title="Add another one capability string into the NETCONF capabilities structure.">nc_cpblts_add</a> (<span class="keyword">struct</span> nc_cpblts *capabilities, <span class="keyword">const</span> <span class="keywordtype">char</span>* capability_string);
<a name="l00186"></a>00186 
<a name="l00194"></a>00194 <span class="keywordtype">int</span> <a class="code" href="../../db/d52/group__session.html#gacb59cf4fa78bf02c22afac395acf0693" title="Remove specified capability string from the NETCONF capabilities structure.">nc_cpblts_remove</a> (<span class="keyword">struct</span> nc_cpblts *capabilities, <span class="keyword">const</span> <span class="keywordtype">char</span>* capability_string);
<a name="l00195"></a>00195 
<a name="l00204"></a>00204 <span class="keywordtype">int</span> <a class="code" href="../../db/d52/group__session.html#gaa8325078c33d25a7cf48e1ed9d417ff4" title="Check if the given capability is supported by the session.">nc_cpblts_enabled</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_session* session, <span class="keyword">const</span> <span class="keywordtype">char</span>* capability_string);
<a name="l00205"></a>00205 
<a name="l00215"></a>00215 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../db/d52/group__session.html#gabed55135f1868bef5f266737b8862aa4" title="Get complete capability string including parameters.">nc_cpblts_get</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_cpblts *c, <span class="keyword">const</span> <span class="keywordtype">char</span>* capability_string);
<a name="l00216"></a>00216 
<a name="l00222"></a>00222 <span class="keywordtype">void</span> <a class="code" href="../../db/d52/group__session.html#gae92c774e940114b4733f85e186d84620" title="Move NETCONF capabilities structure iterator to the beginning of the capability strings list...">nc_cpblts_iter_start</a>(<span class="keyword">struct</span> nc_cpblts *c);
<a name="l00223"></a>00223 
<a name="l00234"></a>00234 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="../../db/d52/group__session.html#gaea2ced8d4e5f2cc9971680e49f876c58" title="Get the next capability string from the given NETCONF capabilities structure.">nc_cpblts_iter_next</a>(<span class="keyword">struct</span> nc_cpblts *c);
<a name="l00235"></a>00235 
<a name="l00245"></a>00245 <span class="keywordtype">int</span> <a class="code" href="../../db/d52/group__session.html#ga79a7aea77cbfe29535eb83a6e5c60419" title="Get number of capabilities in structure.">nc_cpblts_count</a>(<span class="keyword">const</span> <span class="keyword">struct</span> nc_cpblts *c);
<a name="l00246"></a>00246 
<a name="l00256"></a>00256 <span class="keyword">struct </span>nc_cpblts *<a class="code" href="../../db/d52/group__session.html#ga6f39a278e3d907a0b26878df332ebc71" title="Get NULL terminated list of default capabilities supported by libnetconf.">nc_session_get_cpblts_default</a>();
<a name="l00257"></a>00257 
<a name="l00267"></a>00267 <a class="code" href="../../db/d52/group__session.html#ga076533ff0185f0be79fa9edbed22e0b7" title="Type representing NETCONF message-id attribute.">nc_msgid</a> <a class="code" href="../../db/de9/group__rpc.html#ga9a4b99f1ccfbf736f35730ea45bed8dc" title="Send &lt;rpc&gt; request via specified NETCONF session. This function is supposed to be performed only by N...">nc_session_send_rpc</a> (<span class="keyword">struct</span> nc_session* session, <span class="keyword">const</span> <a class="code" href="../../db/de9/group__rpc.html#gab21d1d39737065c552f2ccc5b4819262" title="rpc message.">nc_rpc</a> *rpc);
<a name="l00268"></a>00268 
<a name="l00279"></a>00279 <a class="code" href="../../db/d52/group__session.html#ga076533ff0185f0be79fa9edbed22e0b7" title="Type representing NETCONF message-id attribute.">nc_msgid</a> <a class="code" href="../../d0/de2/group__reply.html#ga893dde0156194a5146f5d5ae44558281" title="Send &lt;rpc-reply&gt; response via specified NETCONF session. This function is supposed to be performed on...">nc_session_send_reply</a> (<span class="keyword">struct</span> nc_session* session, <span class="keyword">const</span> <a class="code" href="../../db/de9/group__rpc.html#gab21d1d39737065c552f2ccc5b4819262" title="rpc message.">nc_rpc</a>* rpc, <span class="keyword">const</span> <a class="code" href="../../d0/de2/group__reply.html#ga40338a1274759a932a7c2c7b8ed0121d" title="reply message.">nc_reply</a> *reply);
<a name="l00280"></a>00280 
<a name="l00290"></a>00290 <a class="code" href="../../db/d52/group__session.html#ga076533ff0185f0be79fa9edbed22e0b7" title="Type representing NETCONF message-id attribute.">nc_msgid</a> <a class="code" href="../../db/de9/group__rpc.html#ga30e4280a6d10447d210ebdfb2befb4c6" title="Receive &lt;rpc&gt; request from the specified NETCONF session. This function is supposed to be performed o...">nc_session_recv_rpc</a> (<span class="keyword">struct</span> nc_session* session, <a class="code" href="../../db/de9/group__rpc.html#gab21d1d39737065c552f2ccc5b4819262" title="rpc message.">nc_rpc</a>** rpc);
<a name="l00291"></a>00291 
<a name="l00301"></a>00301 <a class="code" href="../../db/d52/group__session.html#ga076533ff0185f0be79fa9edbed22e0b7" title="Type representing NETCONF message-id attribute.">nc_msgid</a> <a class="code" href="../../d0/de2/group__reply.html#ga53fec7353656b7e9c7ca4742149dced0" title="Receive &lt;rpc-reply&gt; response from the specified NETCONF session. This function is supposed to be perf...">nc_session_recv_reply</a> (<span class="keyword">struct</span> nc_session* session, <a class="code" href="../../d0/de2/group__reply.html#ga40338a1274759a932a7c2c7b8ed0121d" title="reply message.">nc_reply</a>** reply);
<a name="l00302"></a>00302 
<a name="l00310"></a>00310 <a class="code" href="../../d0/de2/group__reply.html#ga40338a1274759a932a7c2c7b8ed0121d" title="reply message.">nc_reply</a> *<a class="code" href="../../db/de9/group__rpc.html#ga53db624265a53d44d597c9ac7df74259" title="Send &lt;rpc&gt; and receive &lt;rpc-reply&gt; via the specified NETCONF session.">nc_session_send_recv</a> (<span class="keyword">struct</span> nc_session* session, <span class="keyword">const</span> <a class="code" href="../../db/de9/group__rpc.html#gab21d1d39737065c552f2ccc5b4819262" title="rpc message.">nc_rpc</a> *rpc);
<a name="l00311"></a>00311 
<a name="l00312"></a>00312 <span class="preprocessor">#endif </span><span class="comment">/* SESSION_H_ */</span><span class="preprocessor"></span>
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a>      </li>
      <li class="navelem"><a class="el" href="../../da/d46/session_8h.html">session.h</a>      </li>

    <li class="footer">Generated on Fri Aug 3 2012 08:25:37 for libnetconf by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0-20120409 </li>
   </ul>
 </div>


</body>
</html>
